In files bbox.cpp and bsphere.cpp there is unnecessary conversion from int to
float for multiplication value by 1.5 and then it is converted back for
assignement to the same int variable. I'm talking about:
bbox.cpp:
maxfinitecount = 1.5 * maxfinitecount;
bsphere.cpp:
maxelements = 1.5 * maxelements;
It is possible that some C++ compilers perform such operations completly on
ints but I doubt it is part of C++ standard or component of being not
outdated. The same written as
bbox.cpp:
maxfinitecount += maxfinitecount / 2;
bsphere.cpp:
maxelements += maxelements / 2;
where '/2' on ints is often calculated using bits operations seems useful.
I'm reposting it here becouse it seems not ordinary 'warning free' issue.
ABX
Post a reply to this message
|